// ml:run = $bin < input
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>

int n, k;
std::string s;
bool open[30];
int last[30];

int main()
{
    std::ios::sync_with_stdio(false);
    std::cin >> n >> k;
    std::cin >> s;
    int len = s.size();
    for (int i = 0; i < 30; i++) last[i] = -1;
    for (int i = n - 1; i >= 0; i--) {
        int id = s[i] - 'A';
        if (last[id] < 0) last[id] = i;
    }
    int now = 0;
    bool unguarded = false;
    for (int i = 0; i < len; i++) {
        int id = s[i] - 'A';
        if (!open[id]) {
            open[id] = true;
            now++;
            if (now > k) unguarded = true;
        }
        if (open[id]) {
            if (last[id] == i) now--;
        }
    }
    if (unguarded)
        std::cout << "YES\n";
    else
        std::cout << "NO\n";
}

